#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	int sum=0;
	int i,j=1;
	for(i=1;i<=n;i++)
	{
		j=j*i;
		sum=sum+j;
	}
	printf("sum=%d",sum);
	return 0;
}
